linalg_sorting Module


Uses


Interfaces

public interface sort

An interface to the sorting routines.

  • private subroutine sort_dbl_array(x, ascend)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

  • private subroutine sort_dbl_array_ind(x, ind, ascend, err)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    integer(kind=int32), intent(inout), dimension(:) :: ind

    An array, the same size as x, that is sorted along with x. This is often useful as a tracking array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine sort_cmplx_array(x, ascend)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

  • private subroutine sort_cmplx_array_ind(x, ind, ascend, err)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    integer(kind=int32), intent(inout), dimension(:) :: ind

    An array, the same size as x, that is sorted along with x. This is often useful as a tracking array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine sort_eigen_cmplx(vals, vecs, ascend, err)

    Sorts eigenvalues and their associated eigenvectors.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:) :: vals

    On input, an N-element array containing the eigenvalues. On output, the sored eigenvalues.

    complex(kind=real64), intent(inout), dimension(:,:) :: vecs

    On input, the N-by-N matrix containing the eigenvectors (one vector per column) associated with vals. On output, the sorted eigenvector matrix.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine sort_eigen_dbl(vals, vecs, ascend, err)

    Sorts eigenvalues and their associated eigenvectors.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:) :: vals

    On input, an N-element array containing the eigenvalues. On output, the sored eigenvalues.

    real(kind=real64), intent(inout), dimension(:,:) :: vecs

    On input, the N-by-N matrix containing the eigenvectors (one vector per column) associated with vals. On output, the sorted eigenvector matrix.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine sort_int32_array(x, ascend)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

  • private subroutine sort_int32_array_ind(x, ind, ascend, err)

    Sorts an array.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), dimension(:) :: x

    On input, the array to sort. On output, the sorted array.

    integer(kind=int32), intent(inout), dimension(:) :: ind

    An array, the same size as x, that is sorted along with x. This is often useful as a tracking array.

    logical, intent(in), optional :: ascend

    An optional input that, if specified, controls if the array is sorted in an ascending order (default), or a descending order.

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.